package com.monster.starter.redis.config;

import com.monster.starter.redis.utils.RedisUtils;
import com.monster.starter.redis.utils.RedissonLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

/**
 * 初始化静态客户端
 * @author kuang
 */
@Component
public class InitRedis extends RedissonLock {
    @Autowired
    public void setRedissonClient (RedisTemplate redisTemplate) {
        RedisUtils.redisTemplate = redisTemplate;
    }
    @Autowired
    public void setRedissonClient (RedissonClient client) {
        RedissonLock.client = client;
    }
}
